"""
MicroPython utime module stubs
Time related functions
"""

from typing import Optional, Tuple

def sleep(seconds: float) -> None:
    """Sleep for the given number of seconds"""
    ...

def sleep_ms(ms: int) -> None:
    """Sleep for the given number of milliseconds"""
    ...

def sleep_us(us: int) -> None:
    """Sleep for the given number of microseconds"""
    ...

def ticks_ms() -> int:
    """Get millisecond counter"""
    ...

def ticks_us() -> int:
    """Get microsecond counter"""
    ...

def ticks_cpu() -> int:
    """Get CPU cycle counter"""
    ...

def ticks_add(ticks: int, delta: int) -> int:
    """Add offset to ticks value"""
    ...

def ticks_diff(ticks1: int, ticks2: int) -> int:
    """Calculate difference between ticks"""
    ...

def time() -> int:
    """Get current time in seconds since epoch"""
    ...

def localtime(secs: Optional[int] = None) -> Tuple:
    """Convert time to local time tuple"""
    ...

def gmtime(secs: Optional[int] = None) -> Tuple:
    """Convert time to UTC tuple"""
    ...

def mktime(tuple: Tuple) -> int:
    """Convert time tuple to seconds"""
    ...
